﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="LibraryDirectory.aspx.cs" Inherits="Votations.NSurvey.WebAdmin.LibraryDirectory" %>
<%@ Register TagPrefix="uc1" TagName="SurveyOptionControl" Src="UserControls/SurveyOptionControl.ascx" %>
<%@ Import Namespace = "Votations.NSurvey.WebAdmin"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentLinkAction" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">
<LINK href="css/nsurveyadmin.css" type=text/css rel=stylesheet >
<table class=TableLayoutContainer cellSpacing=0 cellPadding=0>
  <tr>
    <td class=contentCell vAlign=top><asp:label id=MessageLabel runat="server" ForeColor="Green" Visible="False"></asp:label>
      <table class=smallText>
        <tr>
          <td colSpan=2><font class=titleFont 
            ><asp:literal id=LibraryTitle 
             runat="server" EnableViewState="False" 
            Text="The library"></asp:literal></font><br 
            ><IMG src="images/linebreak.gif" > </td></tr>
        <tr>
          <td>&nbsp;&nbsp; </td>
          <td>
            <table class=smallText width="100%">
              <tr >
                <td width="650"><asp:datalist id=LibraryDataList runat="server" CellSpacing="5" RepeatColumns="3" CssClass="smallText" CellPadding="5" RepeatDirection="Horizontal">
<ItemTemplate>
<STRONG>
<asp:HyperLink id=DirectoryItemsHyperLink NavigateUrl='<%#UINavigator.LibraryTemplatesHyperLink+"?surveyid="+SurveyId+"&libraryid="+DataBinder.Eval(Container.DataItem, "LibraryId")+"&menuindex="+MenuIndex%>' runat="server"><%# DataBinder.Eval(Container.DataItem, "LibraryName")%></asp:HyperLink></strong>
<asp:LinkButton id=EditDirectoryHyperLink Runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "LibraryId")%>'>(<%#GetPageResource("EditLibraryInfo")%>)</asp:LinkButton> 
</ItemTemplate>
</asp:datalist></td></tr></table></td></tr></table>
      <P><asp:button id=AddNewLibraryButton runat="server" Text="Add new library" onclick="AddNewLibraryButton_Click"></asp:button></P>
<asp:PlaceHolder Runat="server" ID="editplaceholder" Visible="false">
      <P>
      <TABLE class=innerText>
        <TR>
          <TD colSpan=2><FONT class=titleFont><asp:literal id=AddLibraryTitle runat="server" Text="Add new library" EnableViewState="False"></asp:literal></FONT><BR><IMG 
            src="images/linebreak.gif"> </TD></TR>
        <TR>
          <TD>&nbsp;&nbsp; </TD>
          <TD>
            <TABLE class=innerText>
              <TR>
                <TD noWrap width=100><STRONG><asp:literal id=LibraryNameLabel runat="server" Text="Library name :" EnableViewState="False"></asp:literal></STRONG></TD>
                <TD width=480><asp:textbox id=LibraryNameTextBox runat="server"></asp:textbox></TD></TR></TABLE><BR><asp:button id=AddLibraryButton runat="server" Text="Add library" onclick="AddLibraryButton_Click"></asp:button><asp:button id=UpdateLibraryButton runat="server" Text="Update library" onclick="UpdateLibraryButton_Click"></asp:button><asp:button id=DeleteLibraryButton runat="server" Text="Delete library" onclick="DeleteLibraryButton_Click"></asp:button></TD></TR></TABLE></P>
</asp:PlaceHolder>
</td></tr>
</table>
</asp:Content>
